]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
slider: Make clicking anywhere on the slider menu item pass to the slider
authorJasper St. Pierre <jstpierre@mecheye.net>
Wed, 12 Jun 2013 03:39:56 +0000 (23:39 -0400)
committerJasper St. Pierre <jstpierre@mecheye.net>
Fri, 19 Jul 2013 09:36:02 +0000 (05:36 -0400)
This is a regression from splitting the slider out that never got fixed.
Restore the previous (useful) behavior by adding a public API to the
slider that lets us pass an event through.

https://bugzilla.gnome.org/show_bug.cgi?id=704368

js/ui/slider.js
js/ui/status/volume.js

index 9e5d3361041203aec8df06b34351c61d40f63f47..2076818bbe78c8951ebd42dad3297d16e4501ed2 100644 (file)
@@ -98,6 +98,10 @@ const Slider = new Lang.Class({
     },
 
     _startDragging: function(actor, event) {
+        this.startDragging(event);
+    },
+
+    startDragging: function(event) {
         if (this._dragging) // don't allow two drags at the same time
             return false;
 
@@ -112,7 +116,6 @@ const Slider = new Lang.Class({
         let absX, absY;
         [absX, absY] = event.get_coords();
         this._moveHandle(absX, absY);
-
         return true;
     },
 
index 0ffd3022279978f5de2c9d7446da9920e9889ad3..58c5ec67d8249e524b5ab3dcd49e364b75db1e11 100644 (file)
@@ -43,6 +43,10 @@ const StreamSlider = new Lang.Class({
         this.item.addActor(this._icon, { align: St.Align.MIDDLE });
         this.item.addActor(this._slider.actor, { expand: true });
 
+        this.item.actor.connect('button-press-event', Lang.bind(this, function(actor, event) {
+            this._slider.startDragging(event);
+        }));
+
         this._stream = null;
     },